package xyz.xtt.pay.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import xyz.xtt.pay.api.enums.PayOrderStatusEnum;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tbl_pay_order_log")
@ApiModel(value = "TblPayOrderLog对象", description = "支付订单日志表")
public class TblPayOrderLog implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "pay_order_log_id", type = IdType.AUTO)
    private Long payOrderLogId;

    @ApiModelProperty(value = "支付订单主表id")
    private Long payOrderId;

    /**
     * 支付状态：
     * @see PayOrderStatusEnum#getCode()
     */
    @ApiModelProperty(value = "支付状态： 0 -> 未支付 1 ->  已支付 2 -> 支付失败 3 -> 支付取消  4  -> 待退款 5 -> 退款中  6 -> 已退款 7 -> 退款失败")
    private Integer payStatus;

    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    @ApiModelProperty(value = "支付中心交易内容")
    private String detail;
}
